<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>Document</title>
  <script src="jQuery复习/jquery-3.3.1.js"></script>
 </head>
 <body>
    <button>select</button>
	<button>input</button>
	<br>
    <select>
	   <option>HTML</option>
	   <option>CSS</option>
	   <option>JavaScript</option>
	   <option>JQuery</option>
	</select> <br>
	<input type="checkbox" value="看动画">看动画
	<input type="checkbox" value="打游戏">打游戏
 </body>
   <script>
       $("button:first").click(function(){
		   //:selected选择器选取被选择的option元素
	       console.log($("select :selected").text());
	   });

       $("button:last").click(function(){
	       //:checked 选择器选取所有选中的复选框或单选按钮
		   $("input:checked").each(function(i){
		      console.log($(this).val());
		   });
	   });
   </script>
</html>
